package com.hailin.lease.web.app.controller.payment;

import com.hailin.lease.common.result.Result;
import com.hailin.lease.model.entity.PaymentType;
import com.hailin.lease.web.app.service.PaymentTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: yuhailin
 * @description 支付
 * @date: 2024/8/9 20:51
 */

@Tag(name = "支付方式接口")
@RequiredArgsConstructor
@RestController
@RequestMapping("/app/payment")
public class PaymentController {

    private final PaymentTypeService service;
    @Operation(summary = "获取全部支付方式列表")
    @GetMapping("list")
    public Result<List<PaymentType>> list() {
        List<PaymentType> list = service.list();
        return Result.ok(list);
    }
}
